<ul id="jsddm">

<ul id="jsddm">
<?php foreach($menu_dizini['main'] as $db_main): ?>

<li><a href="<?php echo $db_main['ad']?>"><?php echo$db_main['ad']?></a>
 <ul>
 <?php foreach($menu_dizini['alt'][$db_main['id']] as $db_alt): ?>

   <li><a href="<?php echo $db_alt['link']?>"><?php echo $db_alt['ad']?></a></li>

 <?php endforeach;?>  
 </ul>
</li>
<?php endforeach;?>
</ul>
</ul>